package com.lonty.intelligence.mapper;

import com.lonty.intelligence.model.CommunityNotification;
import com.lonty.intelligence.request.CommunityNotificationList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 陈璇
 * @Date 2020/5/28 14:48
 * @Version 1.0
 */
@Mapper
public interface CommunityNotificationMapper {

    /**
     * 保存社区通知
     * @param communityNotification
     * @return
     */
    int saveCommunityNotification(CommunityNotification communityNotification);

    /**
     * 获取用户所有社区通知
     * @param userInfoId
     * @return
     */
    List<CommunityNotificationList> getCommunityNotificationList(String userInfoId);

    /**
     * 根据ID和用户ID获取社区通知
     * @param userInfoId
     * @param communityNotificationId
     * @return
     */
    CommunityNotificationList getCommunityNotification(@Param("userInfoId") String userInfoId,
                                                       @Param("communityNotificationId") String communityNotificationId);

    /**
     * 删除通知
     * @param id
     * @return
     */
    int deleteNotification(String id);

}
